﻿using System;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI.Selection;

namespace YJKTextDimension.Commands
{
	public class DimensionFilter : ISelectionFilter
	{
		public bool AllowElement(Element elem)
		{
			if (elem.GetType() == typeof(Dimension))
			{
				Dimension dimension = elem as Dimension;
				if (dimension.DimensionType.StyleType == null)
				{
					return true;
				}
			}
			return false;
		}

		public bool AllowReference(Reference reference, XYZ pos)
		{
			return false;
		}
	}
}
